package com.m1book.domain.trace;

import java.io.Serializable;
import java.util.Date;

import org.bson.types.ObjectId;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;

import com.m1book.domain.common.Trace;

@Document(collection = "dona_trace")
public class DonaABookTrace extends Trace implements Serializable {
	private static final long serialVersionUID = -508325894516912031L;
	
	private ObjectId abookId;
	
	@Indexed
	private Date donaTime;
	
	private byte[] notes;
	
	public ObjectId getAbookId() {
		return abookId;
	}

	public void setAbookId(ObjectId abookId) {
		this.abookId = abookId;
	}

	public Date getDonaTime() {
		return donaTime;
	}

	public void setDonaTime(Date donaTime) {
		this.donaTime = donaTime;
	}

	public DonaABookTrace() {
		id = ObjectId.get();
	}

	public byte[] getNotes() {
		return notes;
	}

	public void setNotes(byte[] notes) {
		this.notes = notes;
	}

	public ObjectId getId() {
		return id;
	}

}
